'use strict';

const Service = require('egg').Service;
// 使用
// const moment = require('moment');
const uuid = require('uuid');
class ReleaseService extends Service {
  async add (release, transaction) {
    console.log(release);
    release.id = uuid.v1().replace(new RegExp('-', 'gm'), '');
    const users = await this.app.model.Release.create(release, {
      transaction,
    });
    return users;
  }

}

module.exports = ReleaseService;
